DROP TABLE IF EXISTS `_DBPREFIX_role`;
CREATE TABLE IF NOT EXISTS `_DBPREFIX_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(16) NOT NULL,
  `code` varchar(12) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


DROP TABLE IF EXISTS `_DBPREFIX_role_menu`;
CREATE TABLE IF NOT EXISTS `_DBPREFIX_role_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `menuid` int(11) NOT NULL,
  `rid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


DROP TABLE IF EXISTS `_DBPREFIX_role_permission`;
CREATE TABLE IF NOT EXISTS `_DBPREFIX_role_permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rid` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `group` varchar(32) NOT NULL,
  `mod` varchar(32) NOT NULL,
  `ac` varchar(32) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


DROP TABLE IF EXISTS `_DBPREFIX_member`;
CREATE TABLE IF NOT EXISTS `_DBPREFIX_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account` varchar(16) NOT NULL,
  `name` varchar(12) NOT NULL,
  `password` varchar(32) NOT NULL,
  `email` varchar(16) NOT NULL,
  `mobile` varchar(15) NOT NULL,
  `idcard` varchar(15) NOT NULL,
  `position` varchar(16) NOT NULL COMMENT '职位',
  `cert` int(11) NOT NULL COMMENT '证书',
  `depid` int(11) NOT NULL COMMENT '部门',
  `no` varchar(16) NOT NULL COMMENT '工号',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

DROP TABLE IF EXISTS `_DBPREFIX_member_role`;
CREATE TABLE IF NOT EXISTS `_DBPREFIX_member_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rid` int(11) NOT NULL,
  `mid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;